D_ARMV7L_LIBMSLOG_LIBS :=`pkg-config --libs libmslog_armv7l`
D_ARMV7L_LIBMSLOG_INCLUDES :=`pkg-config --cflags libmslog_armv7l`
D_ARMV7L_LIBMSCOMMON_LIBS :=`pkg-config --libs libmscommon_armv7l`
D_ARMV7L_LIBMSCOMMON_INCLUDES :=`pkg-config --cflags libmscommon_armv7l`
D_ARMV7L_LIBPROTOCOL_LIBS	:=`pkg-config --libs	libmsprotocol_armv7l`
D_ARMV7L_LIBPROTOCOL_INCLUDES:=`pkg-config --cflags	libmsprotocol_armv7l`

C_ARMV7L_BASE_INCLUDE:=${D_ARMV7L_LIBMSLOG_INCLUDES} ${D_ARMV7L_LIBMSCOMMON_INCLUDES}	${D_ARMV7L_LIBPROTOCOL_INCLUDES} -I../ffmpeg
C_ARMV7L_BASE_LIBS   :=${D_ARMV7L_LIBMSLOG_LIBS}     ${D_ARMV7L_LIBMSCOMMON_LIBS}	${D_ARMV7L_LIBPROTOCOL_LIBS}

libmsbitStream_armv7l_PATH=/home/sugao/cross-compile/H2_toolchain/toolchain/4.9.3
libmsbitStream_armv7l_CC=${libmsbitStream_armv7l_PATH}/bin/arm-cortexa9-linux-gnueabihf-gcc
libmsbitStream_armv7l_SRC=${C_SRC}
libmsbitStream_armv7l_CFLAGS=${C_ARMV7L_BASE_INCLUDE} ${C_ARMV7L_BASE_LIBS} ${C_INCLUDE} ${CFLAGS_SHARE} 

armv7l:libmsbitStream_armv7l install_armv7l
libmsbitStream_armv7l: 
	mkdir -p $(OUT_LIB)
	mkdir -p $(OUT_INCLUDE)
	mkdir -p $(OUT_INCLUDE)/flv
	mkdir -p $(OUT_INCLUDE)/mp3
	mkdir -p $(OUT_INCLUDE)/mpeg
	cp -fr src/*.h $(OUT_INCLUDE)
	cp -fr src/flv/flv.h $(OUT_INCLUDE)/flv/
	cp -fr src/mp3/*.h $(OUT_INCLUDE)/mp3/
	cp -fr src/mpeg/*.h $(OUT_INCLUDE)/mpeg/
	$($@_CC)  $($@_SRC)  $($@_CFLAGS)  -o $(OUT_LIB)/$(PROGRAM_NAME).so 
install_armv7l: 
	mkdir -p  ${prefix_armv7l}/lib/ 
	mkdir -p  ${prefix_armv7l}/include/   
	mkdir -p  ${prefix_armv7l}/lib/pkgconfig/ 
	cp -fr $(OUT_LIB)/$(PROGRAM_NAME).so      ${prefix_armv7l}/lib/     
	cp -fr $(OUT_INCLUDE) 	                  ${prefix_armv7l}/include/	     
	cp -fr platform/$(PROGRAM_NAME)_armv7l.pc         ${prefix_armv7l}/lib/pkgconfig/
uninstall_armv7l:
	rm -fr ${prefix_armv7l}/lib/$(PROGRAM_NAME).so 
	rm -fr ${prefix_armv7l}/include/$(PROGRAM_NAME)
	rm -fr ${prefix_armv7l}/lib/pkgconfig/$(PROGRAM_NAME)_armv7l.pc		
